package com.storage.system.vo;

import com.storage.system.domain.StorageProperties;
import com.storage.system.domain.StoragePropertiesValue;
import io.swagger.annotations.ApiModel;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 属性表 storage_propertieVO
 *
 * @author storage
 * @date 2019-08-18
 */
@ApiModel(value = "属性对象")
public class StoragePropertiesVO implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 属性id
     */
    private Long id;
    /**
     * 属性名称(颜色;尺码;..)
     */
    private String propertiesName;
    /**
     * 所属分类id
     */
    private Long categoryId;
    /**
     * 创建人id
     */
    private Long createUserId;
    /**
     * 修改时间
     */
    private Date modifyTime;
    /**
     * 创建时间
     */
    private Date createTime;

    /** 自定义属性 */
    /**
     * 属性选项列表
     */
    private List<StoragePropertiesValue> propertiesValues;
    private Integer referrence;
    /**
     * 多选：1-单选;2-多选
     */
    private Integer multiChoice;

    public StoragePropertiesVO() {
    }

    public StoragePropertiesVO(StorageProperties storageProperties) {
        this.id = storageProperties.getId();
        this.propertiesName = storageProperties.getPropertiesName();
        this.categoryId = storageProperties.getCategoryId();
        this.createUserId = storageProperties.getCreateUserId();
        this.modifyTime = storageProperties.getModifyTime();
        this.createTime = storageProperties.getCreateTime();
        this.multiChoice = storageProperties.getMultiChoice();
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public String getPropertiesName() {
        return propertiesName;
    }

    public void setPropertiesName(String propertiesName) {
        this.propertiesName = propertiesName;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public List<StoragePropertiesValue> getPropertiesValues() {
        return propertiesValues;
    }

    public void setPropertiesValues(List<StoragePropertiesValue> propertiesValues) {
        this.propertiesValues = propertiesValues;
    }

    public Integer getReferrence() {
        return referrence;
    }

    public void setReferrence(Integer referrence) {
        this.referrence = referrence;
    }

    public Integer getMultiChoice() {
        return multiChoice;
    }

    public void setMultiChoice(Integer multiChoice) {
        this.multiChoice = multiChoice;
    }

    public StorageProperties toDO() {
        StorageProperties storageProperties = new StorageProperties();
        storageProperties.setId(this.getId());
        storageProperties.setPropertiesName(this.getPropertiesName());
        storageProperties.setCategoryId(this.getCategoryId());
        storageProperties.setCreateUserId(this.getCreateUserId());
        storageProperties.setCreateTime(this.getCreateTime());
        storageProperties.setModifyTime(this.getModifyTime());
        return storageProperties;
    }

}

